import 'package:get/get.dart';
import 'package:ball_lion/server/api/live_api.dart';

import 'package:ball_lion/entity/live/live_goods_entity.dart';

class LiveGoodsLogic extends GetxController {
  int? _liveId;
  List<GoodsEntity>? goods;

  int? get liveId => _liveId;

  set liveId(int? value) {
    _liveId = value;
    update();
  }

  @override
  void onReady() {
    getData();
    super.onReady();
  }

  Future getData() async {
    goods = await LiveApi.getLiveGoods(liveId);
    update();
  }
}
